package practice;
interface Animal{
    void eat();
}
public class AnimalTest {
    public static void main(String[] args) {
        Animal a=new Animal() {
            @Override
            public void eat() {
                System.out.println("动物吃东西");
            }
        };
        a.eat();
    }
}
